package com.maylann.ratiocheater.encoder;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * by Maylann
 */
public class TorrentDictionary<K, V> {
    
    private Map<K, V> dictionary;
    
    public static final String ANNOUNCE = "announce";
    public static final String COMMENT = "comment";
    public static final String CREATED_BY = "created by";
    public static final String CREATION_DATE = "creation date";
    public static final String ENCODING = "encoding";
    public static final String INFO = "info";
    public static final String FILES = "files";
    public static final String NAME = "name";
    public static final String PIECE_LENGTH = "piece length";
    public static final String PIECES = "pieces";
    public static final String PRIVATE = "private";
    public static final String PATH = "path";


    public TorrentDictionary() {
        this.dictionary = new LinkedHashMap<K, V>();
    }

    public int size() {
        return dictionary.size();
    }

    public boolean isEmpty() {
        return dictionary.isEmpty();
    }

    public boolean containsKey(K key) {
        return dictionary.containsKey(key);
    }

    public boolean containsValue(V value) {
        return dictionary.containsValue(value);
    }

    public Object get(K key) {
        return dictionary.get(key);
    }

    public Object put(K key, V value) {
        return dictionary.put(key, value);
    }

    public Object remove(K key) {
        return dictionary.remove(key);
    }

    public void putAll(Map<? extends K, ? extends V> map) {
        dictionary.putAll(map);
    }

    public void clear() {
        dictionary.clear();
    }

    public Set<K> keySet() {
        return dictionary.keySet();
    }

    public Collection<V> values() {
        return dictionary.values();
    }

    public Set<Map.Entry<K, V>> entrySet() {
        return dictionary.entrySet();
    }

    public boolean equals(Object o) {
        return dictionary.equals(o);
    }

    public int hashCode() {
        return dictionary.hashCode();
    }

}
